xen/arm: Divide GIC initialization in 2 parts
authorJulien Grall <julien.grall@linaro.org>
Wed, 1 Apr 2015 16:21:34 +0000 (17:21 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 2 Apr 2015 09:42:34 +0000 (10:42 +0100)
commitae2a9d274fbada625442adcd6b79f953561e94dc
treea5b269e4fce049c03eb4be2ac006869876b48b12
parent131a0ea637e323b1adc5f076165f349612298afa
xen/arm: Divide GIC initialization in 2 parts

Currently the function to translate IRQ from the device tree is set
unconditionally  to be able to be able to retrieve serial/timer IRQ before the
GIC has been initialized.

It assumes that the xlate function won't ever changed. We may also need to
have the primary interrupt controller very early.

Rework the gic initialization in 2 parts:
    - gic_preinit: Get the interrupt controller device tree node and set
up GIC and xlate callbacks
    - gic_init: Initialize the interrupt controller and the boot CPU
    interrupts.

The former function will be called just after the IRQ subsystem as been
initialized.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Frediano Ziglio <frediano.ziglio@huawei.com>
Cc: Zoltan Kiss <zoltan.kiss@huawei.com>
xen/arch/arm/gic-v2.c
xen/arch/arm/gic-v3.c
xen/arch/arm/gic.c
xen/arch/arm/setup.c
xen/include/asm-arm/gic.h